package begin;

import bean.ItemBean;
import bean.UserBean;
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import tools.UtilJDBC;
import view.RegisterView;
import view.UserMenuView;

import java.util.ArrayList;

/**
 * @Author 王志康
 * @Date 2021/9/6 9:21
 * @Version 1.0.0
 */
public class UserMenu extends Application {
    public static ArrayList<ItemBean> listItem=new ArrayList<>();
    public static UserBean user;
    private static Stage stage=new Stage();

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) {
        stage.setTitle("丰翼超市购物管理系统");
        gotoUserMenu();
        primaryStage.show();
    }

    public UserMenu() {
        try {
            stage = new Stage();
            start(stage);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void gotoUserMenu() {
        try {
            stage.setScene(UserMenuView.show());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
